<?php if (basename(__FILE__) == basename($_SERVER['PHP_SELF'])) header("Location: index.php"); 
require_once ("sdk/facebook_header.php");
$current = preg_replace("/\.php/", "", basename($_SERVER['PHP_SELF']));
?>
<!DOCTYPE HTML>
<html lang="ka">
    <head>
        <meta charset="UTF-8">
        <?php if( !DEBUG && REDIRECT ): ?>
        <script type="text/javascript">
		    var url = '<?php echo FB_PAGE_URL; ?>'
		    if(top === self) {
				top.location.href = url;
		    }
		</script>
		<?php endif; ?>
		<link rel="stylesheet" type="text/css" href="media/css/main.css" media="all" />
        <link rel="stylesheet" type="text/css" href="media/css/style.css" media="all" />
        <link rel="stylesheet" type="text/css" href="media/css/jquery.checkbox.css" media="all" />
        <!--[if IE 7]>
        	<link rel="stylesheet" type="text/css" href="media/css/ie7.css" media="all" />
        <![endif]-->
		<?php if( DEBUG ) : ?>
    	<style type="text/css">
    		html, body { overflow: auto; }
    	</style>
    	<?php endif; ?>		
        <title><?php echo TITLE; ?></title>
    </head>
    <body>
        <div id="wrapper">
            <div id="header" class="clearfix">
            	<?php if ( $current == 'rating.php' ) :  ?>
            		<div id="rating-search">
            			<form action="" method="post">
            				<input type="text" name="search" id="search" value="" />
            				<input type="submit" name="submit" id="search-btn" value="Search" title="Search" />
            			</form>
            		</div><!-- #rating-search -->
        		<?php endif; ?>
                <div id="logo">
                    <a href="<?php echo LINK; ?>" target="_blank" title="<?php echo COMPANY; ?>"><?php echo COMPANY; ?></a>
                </div><!-- #logo -->
                <h2><?php echo $page_title; ?></h2>
            </div><!-- #header -->
            <div id="navigation" class="clearfix">
            	<ul>
            		<li id="question-btn<?php echo ( $current == 'index' ) ? '-active'  : ''; ?>"><a href="index.php" title="შეკითხვა">შეკითხვა</a></li>
            		<li id="rating-btn<?php echo ( $current == 'rating' ) ? '-active'  : ''; ?>"><a href="rating.php" title="რეიტინგი">რეიტინგი</a></li>
            		<li id="prizes-btn<?php echo ( $current == 'prizes' ) ? '-active'  : ''; ?>"><a href="prizes.php" title="პრიზები">პრიზები</a></li>
            		<li id="rules-btn<?php echo ( $current == 'rules' ) ? '-active'  : ''; ?>"><a href="rules.php" title="წესები">წესები</a></li>
            	</ul>
            </div><!-- #navigation -->
            <div id="content" class="content-radius">            